<template>
  <div>
    <el-popover
      placement="top"
      width="160"
      v-model="visible">
      <p>已阅读此评审内容吗？</p>
      <div style="text-align: right; margin: 0">
        <el-button size="mini" type="text" @click="visible = false">取消</el-button>
        <el-button type="primary" size="mini" @click="doTask">确定</el-button>
      </div>
      <el-button type="primary" size="mini" class="toDo-button"  slot="reference">处理</el-button>
    </el-popover>
  </div>
</template>
<script>
import crudProject from "@/api/project/list";
export default {
  props: {
    data: {
      type: Object,
      required: true
    },
  },
  data() {
    return {
      visible:false
    }
  },
  methods: {

    doTask() {
      crudProject.doTask({done:true,id:this.data.linkId}).then(res => {
        this.visible = false
        this.$emit('toQuery')
      }).catch(err => {
        console.log(err)
      })
    }
  }
}
</script>

<style>
.option-item {
  margin-left: 4px;
}

</style>
